package com.farm.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class ImgWebConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/img/userImg/**").addResourceLocations("file:G:\\Documents\\GraduationProject\\wisdom-farm-ssm\\src\\main\\resources\\static\\assest\\img\\userImg\\");
        registry.addResourceHandler("/img/produceImg/**").addResourceLocations("file:G:\\Documents\\GraduationProject\\wisdom-farm-ssm\\src\\main\\resources\\static\\assest\\img\\produceImg\\");
    }
}
